import { SAVE_ARTICLES } from '../action/actionType';

const initialState = {
  list: [],
};

export default function articleReducer(state = initialState, { type, payload }) {
  switch (type) {
    case SAVE_ARTICLES:
      return {
        ...state,
        list: payload,
      };
    default:
      return state;
  }
}
